{extend name="shop/default/base" /}
{block name="resources"}
<!-- 添加css、字体文件文件 -->
<style>
.member-main .box .pic-model dl dd{
	width:50%;float:left;text-align: center;
}
</style>
{/block}
{block name="main"}
<div class="margin-w1210">
	{include file='shop/default/Member/controlLeftMenu'/}
	<div class="member-main">
		<div class="box">
			<div class="tabmenu">
				<ul class="tab">
					<li class="first active">{:lang('member_my_collection')}</li>
				</ul>
			</div>
			<div class="mar_top">
				<table class="ncm-default-table">
					<tbody>
						<tr>
							<td colspan="2" class="pic-model">
								<ul class="js-collection-list">
								{if condition="$page_count == 0"}
									<div class="emptyFrame clearfix" style="cursor: pointer;"><i class="icon i-order"></i><span>{:lang('member_collect_favorite_goods')}</span> </div>
								{else/}
								
									{foreach name="goods_collection_list" item="goods" key="k"}
										{notempty name="$goods['goods_id']"}
											<li class="favorite-pic-list">
												<div class="favorite-goods-thumb">
													<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" title="{$goods.goods_name}"><img src="{:__IMG($default_goods_img)}" class="lazy_load" data-original="{:__IMG($goods['pic_cover_mid'])}" alt="{$goods.goods_name}" width="200" height="200"></a>
												</div>
												<div class="favorite-goods-info">
													<dl>
														<dt>
															<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" title="{$goods.goods_name}">{$goods.goods_name}</a>
														</dt>
														<dd class="price">¥{$goods.promotion_price}</dd>
														<dd class="hover_tan"  onclick="javascript:cancelCollection({$goods.fav_id},'goods',this);">
															<i class="guanzhu1 js-guanzhu0"></i>
															<a href="javascript:;" class="ncm-btn-mini">{:lang('member_cancel')}</a>
														</dd>
													</dl>
												</div>
											</li>
										{/notempty}
									{/foreach}
									
								{/if}
								</ul>
							</td> 
						</tr>
					</tbody>
				</table>
				{include file='shop/default/controlCommonPage'/}
			</div>
		</div>
	</div>
</div>
{/block}
{block name="RightSideBar"}{/block}
{block name="javascript"}
<script>
//取消收藏 is_reload: true 刷新
function cancelCollection(fav_id, fav_type, obj) {
	$.ajax({
		url : __URL(SHOPMAIN + "/components/cancelcollgoodsorshop"),
		type : "post",
		data : {
			"fav_id" : fav_id,
			"fav_type" : fav_type
		},
		success : function(data) {
			$.msg("{:lang('member_abolish_successful')}");
			$(obj).parent().parent().parent("li").remove();
		}
	});
}
</script>
{/block}